package com.example.securityconfiggen.model;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * Properties请求模型类，用于接收表单提交的Properties内容
 */
public class PropertiesRequest {

    @NotBlank(message = "项目名称不能为空")
    private String projectName;

    @NotBlank(message = "Properties内容不能为空")
    @Pattern(regexp = "^(\\s*[\\w.\\-]+\\s*=.*(\r?\n)?)+$", message = "Properties格式不正确，请确保每行的键名只包含字母、数字、点、下划线和连字符")
    private String propertiesContent;

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getPropertiesContent() {
        return propertiesContent;
    }

    public void setPropertiesContent(String propertiesContent) {
        this.propertiesContent = propertiesContent;
    }
} 